{% extends 'system_template/public/base_main.html' %}
{% block cite %}新增分类{% endblock %}
{% block head %}
    <script charset="utf-8" src="{{ url_for('static',filename='lib/kindeditor/kindeditor-all.js') }}"></script>
    <script charset="utf-8" src="{{ url_for('static',filename='lib/kindeditor/lang/zh-CN.js') }}"></script>
    <script src="{{ url_for('static',filename='js/cxcolor.min.js') }}"></script>
{% endblock %}
{% block content %}
    <form class="layui-form">
        {#  非复选框   #}
        {% for foo in form %}
                <div class="layui-form-item">
                    <label class="layui-form-label">{{ foo.label }}</label>
                    <div class="layui-input-block">
                        {{ foo }}
                        <div class="layui-form-mid">
                            {% if foo.name=='column_name' %}
                                分类名称[<span style="color: red">* 必填</span>]
                            {% elif foo.name=='column_parent_id' %}
                                请选择所属分类
                            {% elif foo.name=='column_order' %}
                                分类排序 [ 越小越靠前 ]
                            {% elif foo.name=='column_keyword' %}
                                分类关键词
                            {% elif foo.name=='column_description' %}
                                分类描述/简介
                            {% elif foo.name=='column_link' %}
                                直链跳转地址: [ 点击直接跳转 ]
                            {% endif %}
                        </div>
                    </div>
                </div>
        {% endfor %}
        <div class="layui-form-item">
            <div class="layui-input-block">
                <a class="layui-btn" onclick="submit_post('{{ url_for('sys_bp.column_list') }}')">保存分类</a>
                <button type="reset" class="layui-btn layui-btn-primary">重置</button>
            </div>
        </div>
    </form>
{% endblock %}